<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:84:"/data/www/html/web2017/public_html/../application/index/view/article/add_column.html";i:1498183496;}*/ ?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>新增栏目</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <!--<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">-->
    <link rel="stylesheet" href="__STATIC__/style/weui.min.css">
    <link rel="stylesheet" href="__STATIC__/style/cmgd.css">
    <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script type="text/javascript" src="__STATIC__/admin/js/layer/layer.js" ></script>
    <!--奥森图标-->
    <link rel="stylesheet" href="__STATIC__/style/FontAwesome_4.2.0/css/font-awesome.min.css">
    <style>
        .text{padding-left:9px; }
        .weui-uploader__input-box{margin-left: 10px;}
        .fa-list-ul{padding-right:8px;}
        .red{color:red;}
        .weui-btn_primary{width:90%;}
    </style>
</head>
<body>

<div class="container" id="container">

    <!--顶部搜索-->
    <div class="page home js_show">

        <form id="form" action="" enctype="multipart/form-data" method="post">

            <div class="page__bd" style="height: 100%;">

                    <div class="weui-cells__title">栏目名称<span class="red">*</span></div>
                    <div class="weui-cells">
                        <div class="weui-cell">
                            <div class="weui-cell__bd">
                                <input class="weui-input" name="title" id="title" type="text" placeholder="请输入栏目名称" value="">
                            </div>
                        </div>
                    </div>

                <a href="javascript:;" class="weui-btn weui-btn_primary" style="margin-top: 8px;" onclick="submit();" >发布</a>

            </div>
        </form>
    </div>
</div>
</body>
<script type="text/javascript" src="/static/admin/webupload/webuploader.min.js"></script>
<script type="text/javascript">
    function submit() {
        var user_column = $('#title').val();
        if (user_column == '') {

            layer.msg('文章栏目不能为空', {icon: 5, time: 1000, shade: 0.1,});
            return false;
        }


        $.post('<?php echo url("article/add_column"); ?>',
                {user_column: user_column},
                function (data) {

                        if (data.code == 1) {

                            layer.msg(data.msg, {icon: 6,time:1500,shade: 0.1}, function(index){
                                layer.close(index);
                                window.location.href="<?php echo url('article/user_column'); ?>";
                            });


                        } else {

                            layer.msg(data.msg, {icon: 5, time: 1500, shade: 0.1,});
                        }
                });
    }


</script>

</html>